learning digraphs